/**
 * 
 */
package site.dao;

import java.sql.Connection;
import java.sql.SQLException;

import neoutil.CommonDao;
import site.entity.ConOrganizationUser;

/**
 * @author Neo
 * 
 */
public class ConOrganizationUserDao extends
		CommonDao<ConOrganizationUser, Long> {
	private String SQL_INSERT = "INSERT INTO conorganizationuser(uuid, userId, organizationId, roleId, entityStatus, entityDatetime) VALUES(?, ?, ?, ?, ?, ?)";

	public ConOrganizationUserDao(Connection connection) {
		super(ConOrganizationUser.class, connection);
	}

	public void save(ConOrganizationUser conOrganizationUser)
			throws SQLException {
		Object[] params = new Object[] { conOrganizationUser.getUuid(),
				conOrganizationUser.getUserId(),
				conOrganizationUser.getOrganizationId(),
				conOrganizationUser.getRoleId(),
				conOrganizationUser.getEntityStatus(),
				conOrganizationUser.getEntityDatetime() };

		execute(SQL_INSERT, params);
	}
}
